/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Engine2D.gui;

import Engine2D.geometry.Shape;
import Engine2D.graphics.GLColour;
import Engine2D.graphics.GLImage;
import Engine2D.graphics.font.GLFont;

/**
 *
 * @author Garys
 */
public class MessageBox2 extends MessageBox {

    /**
     * 
     * @param x
     * @param y
     * @param width
     * @param height
     * @param image
     * @param shape
     * @param message
     * @param colour
     * @param font
     */
    public MessageBox2(int x, int y, int width, int height, GLImage image, Shape shape, String message, GLColour colour, GLFont font) {

        super(x, y, width, height, image, shape, message, colour, font);
    }

    /**
     * 
     * @param mouseButton
     * @param pressedX
     * @param pressedY
     */
    @Override
    public void mousePressed(int mouseButton, int pressedX, int pressedY) {
    }

    /**
     * 
     * @param eventButton
     * @param pressedX
     * @param pressedY
     * @param clickCount
     */
    @Override
    public void mouseClicked(int eventButton, int pressedX, int pressedY, int clickCount) {

        if (clickCount >= 2) {
            if (x <= pressedX && (x + width) >= pressedX) {
                if (y <= pressedY && (y + height) >= pressedY) {

                    if (colour == GLColour.BLACK) {
                        colour = GLColour.GREEN;
                    } else {
                        colour = GLColour.BLACK;
                    }
                }
            }
        }
    }
}
